<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<div style="height: 500px;width: 500px;">
		<button type="button"data-li="xx" id="btn">test</button>
		</div>
	</body>
	<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
	<script>
		$(function(){
			$("#btn").click(function(e){
				e.preventDefault();
				$("<span style='color:red;'>"+Math.random()*100+"</span>").appendTo($(this).parent()).fadeIn('fast');
				alert($(this).attr('data-li'));
			});
		});
	</script>
</html>
